"""
1 修改指定下标数据
 列表序列[0] = 'aaa'
 print(列表序列)  0下标的数据就会变成aaa

2 reverse()  列表翻转

3 sort() 排序，默认升序
list.sort(key = None,reverse = True)  当指定reverse=True时，为降序

"""

namelist = ['Tom','Alin','Carry']
namelist[2] = 'bbb'
print(namelist)

# 列表翻转  reverse()
list1 = [1,4,2,7,5,9,10]
list1.reverse()
print(list1)

#sort  升序或者降序
list2 = [1,4,3,2,7,5,0,19,6]
list2.sort()
print(list2)
list2.sort(reverse=True)
print(list2)

